
xui.Class('RAD.project.ProjectInfo', 'xui.Module',{
    Instance:{
        initialize : function(){ },
        Dependencies:[],
        Required:[],
        properties : {
            "autoDestroy":true,
            "hidden":false,
            "path":"form/myspace/versionspace/DSMdsm/0/RAD/project/ProjectInfo.cls",
            "projectName":"DSMdsm"
        },
        events:{ },
        ViewMenuBar:{},
        functions:{},
        iniComponents : function(){
            // [[Code created by JDSEasy RAD Studio
            var host=this, children=[], properties={}, append=function(child){children.push(child.get(0));};
            xui.merge(properties, this.properties);

            append(
                xui.create("xui.APICaller")
                    .setHost(host,"delversion")
                    .setName("delversion")
                    .setQueryURL("/admin/delProjectVersion")
                    .setQueryMethod("POST")
                    .setRequestDataSource([
                        {
                            "name":"xui_ui_treegrid30",
                            "path":"",
                            "type":"form"
                        }
                    ])
                    .setResponseDataTarget([ ])
                    .setResponseCallback([ ])
                    .setQueryArgs({
                        "projectNams":""
                    })
            );

            append(
                xui.create("xui.APICaller")
                    .setHost(host,"loadProject")
                    .setName("loadProject")
                    .setAutoRun(true)
                    .setQueryURL("/admin/getProjectInfo")
                    .setQueryMethod("POST")
                    .setRequestDataSource([
                        {
                            "name":"xui_ui_group2",
                            "path":"",
                            "type":"form"
                        }
                    ])
                    .setResponseDataTarget([
                        {
                            "name":"xui_ui_dialog4",
                            "path":"data",
                            "type":"form"
                        }
                    ])
                    .setResponseCallback([ ])
                    .onData({
                        "actions":[
                            {
                                "args":[
                                    "versionlist"
                                ],
                                "desc":"动作 1",
                                "method":"fireItemClickEvent",
                                "target":"tab",
                                "type":"control"
                            }
                        ]
                    })
            );

            append(
                xui.create("xui.APICaller")
                    .setHost(host,"versionActionAjax")
                    .setName("versionActionAjax")
                    .setQueryURL("/admin/versionStatusAction")
                    .setQueryMethod("POST")
                    .setRequestDataSource([
                        {
                            "name":"xui_ui_treegrid30",
                            "path":"",
                            "type":"form"
                        }
                    ])
                    .setResponseDataTarget([ ])
                    .setResponseCallback([ ])
                    .setProxyType("AJAX")
                    .onData({
                        "actions":[
                            {
                                "args":[ ],
                                "desc":"动作 1",
                                "koFlag":"_DI_fail",
                                "method":"invoke",
                                "okFlag":"_DI_succeed",
                                "target":"loadproject",
                                "type":"control"
                            }
                        ]
                    })
            );

            append(
                xui.create("xui.APICaller")
                    .setHost(host,"createVersionAjax")
                    .setName("createVersionAjax")
                    .setQueryURL("/admin/createVersion")
                    .setQueryMethod("POST")
                    .setRequestDataSource([
                        {
                            "name":"xui_ui_block110",
                            "path":"",
                            "type":"form"
                        }
                    ])
                    .setResponseDataTarget([ ])
                    .setResponseCallback([ ])
                    .setProxyType("AJAX")
                    .onData({
                        "actions":[
                            {
                                "args":[ ],
                                "desc":"动作 1",
                                "koFlag":"_DI_fail",
                                "method":"invoke",
                                "okFlag":"_DI_succeed",
                                "target":"loadproject",
                                "type":"control"
                            }
                        ]
                    })
            );

            append(
                xui.create("xui.APICaller")
                    .setHost(host,"loadproject")
                    .setName("loadproject")
                    .setAutoRun(true)
                    .setQueryURL("/admin/getProjectVersionList")
                    .setQueryMethod("POST")
                    .setRequestDataSource([
                        {
                            "name":"xui_ui_pagebar3",
                            "path":"",
                            "type":"pagebar"
                        },
                        {
                            "name":"xui_ui_group2",
                            "path":"",
                            "type":"form"
                        }
                    ])
                    .setResponseDataTarget([
                        {
                            "name":"xui_ui_treegrid30",
                            "path":"data",
                            "type":"treegrid"
                        },
                        {
                            "name":"xui_ui_pagebar3",
                            "path":"size",
                            "type":"pagebar"
                        }
                    ])
                    .setResponseCallback([ ])
                    .setQueryArgs({
                        "path":"",
                        "pattern":""
                    })
                    .setProxyType("AJAX")
            );

            append(
                xui.create("xui.APICaller")
                    .setHost(host,"saveApi")
                    .setName("saveApi")
                    .setQueryURL("/admin/updateProjectInfo")
                    .setQueryMethod("POST")
                    .setRequestDataSource([
                        {
                            "name":"xui_ui_group2",
                            "path":"",
                            "type":"form"
                        }
                    ])
                    .setResponseDataTarget([ ])
                    .setResponseCallback([ ])
                    .onData({
                        "actions":[
                            {
                                "args":[ ],
                                "desc":"动作 2",
                                "method":"destroy",
                                "target":"RAD.project.ProjectInfo",
                                "type":"page"
                            }
                        ]
                    })
            );

            append(
                xui.create("xui.UI.Dialog")
                    .setHost(host,"xui_ui_dialog4")
                    .setLeft("-0.8333333333333334em")
                    .setTop("0em")
                    .setWidth("71.66666666666667em")
                    .setHeight("47.5em")
                    .setCaption("编辑-工程信息")
                    .setMaxBtn(false)
            );

            host.xui_ui_dialog4.append(
                xui.create("xui.UI.Group")
                    .setHost(host,"xui_ui_group2")
                    .setDock("top")
                    .setLeft("48.333333333333336em")
                    .setTop("2.5em")
                    .setWidth("18em")
                    .setHeight("11.25em")
                    .setCaption("工程信息")
            );

            host.xui_ui_group2.append(
                xui.create("xui.UI.Block")
                    .setHost(host,"xui_ui_block110")
                    .setDock("top")
                    .setLeft("14.166666666666666em")
                    .setTop("9.166666666666666em")
                    .setHeight("9.25em")
            );

            host.xui_ui_block110.append(
                xui.create("xui.UI.Input")
                    .setHost(host,"url")
                    .setName("url")
                    .setLeft("1.0833333333333333em")
                    .setTop("6.666666666666667em")
                    .setWidth("49.666666666666664em")
                    .setHeight("2em")
                    .setLabelSize("8em")
                    .setLabelCaption("发布地址：")
                    .setMultiLines(true)
            );

            host.xui_ui_block110.append(
                xui.create("xui.UI.ComboInput")
                    .setHost(host,"createTime")
                    .setName("createTime")
                    .setLeft("1.0833333333333333em")
                    .setTop("3.75em")
                    .setWidth("24.666666666666668em")
                    .setLabelSize("8em")
                    .setLabelCaption("创建时间：")
                    .setType("datetime")
                    .onClick({
                        "actions":[
                            {
                                "args":[
                                    "{page.show2()}"
                                ],
                                "desc":"动作 1",
                                "method":"show2",
                                "redirection":"page",
                                "target":"App.home.OrgTree",
                                "type":"page"
                            }
                        ]
                    })
            );

            host.xui_ui_block110.append(
                xui.create("xui.UI.Input")
                    .setHost(host,"projectName")
                    .setName("projectName")
                    .setLeft("1.0833333333333333em")
                    .setTop("0.4166666666666667em")
                    .setWidth("24.666666666666668em")
                    .setLabelSize("8em")
                    .setLabelCaption("名称：")
                    .setValue("DSMdsm")
            );

            host.xui_ui_block110.append(
                xui.create("xui.UI.Input")
                    .setHost(host,"indexPage")
                    .setName("indexPage")
                    .setLeft("26.083333333333332em")
                    .setTop("3.75em")
                    .setWidth("24.666666666666668em")
                    .setHeight("2em")
                    .setLabelSize("8em")
                    .setLabelCaption("首页地址：")
                    .setMultiLines(true)
            );

            host.xui_ui_block110.append(
                xui.create("xui.UI.Input")
                    .setHost(host,"desc")
                    .setName("desc")
                    .setLeft("26.083333333333332em")
                    .setTop("0.4166666666666667em")
                    .setWidth("24.666666666666668em")
                    .setHeight("2em")
                    .setLabelSize("8em")
                    .setLabelCaption("中文名称：")
                    .setMultiLines(true)
            );

            host.xui_ui_dialog4.append(
                xui.create("xui.UI.Group")
                    .setHost(host,"xui_ui_group3")
                    .setDock("fill")
                    .setLeft("18.333333333333332em")
                    .setTop("18.333333333333332em")
                    .setWidth("18em")
                    .setCaption("详细信息")
            );

            host.xui_ui_group3.append(
                xui.create("xui.UI.ButtonViews")
                    .setHost(host,"tab")
                    .setName("tab")
                    .setItems([
                        {
                            "caption":"版本分支",
                            "hidden":false,
                            "id":"versionlist",
                            "imageClass":"fa fa-reorder",
                            "tag":""
                        },
                        {
                            "caption":"页面配置",
                            "className":"RAD.project.ProjectSetting",
                            "hidden":false,
                            "id":"cofig",
                            "imageClass":"xui-uicmd-cmdbox",
                            "tag":"RAD.project.ProjectSetting"
                        },
                        {
                            "caption":"API配置",
                            "className":"RAD.api.APIList",
                            "hidden":false,
                            "id":" APIConfig",
                            "imageClass":"fa fa-cloud",
                            "tag":"RAD.api.APIList"
                        },
                        {
                            "caption":"字体配置",
                            "className":"RAD.resource.FontList",
                            "hidden":false,
                            "id":"FontConfig",
                            "imageClass":"xui-icon-font",
                            "tag":"RAD.resource.FontList"
                        },
                        {
                            "caption":"图片管理",
                            "className":"RAD.resource.ImgConfigList",
                            "hidden":false,
                            "id":"ImgConfig",
                            "imageClass":"xui-icon-html",
                            "tag":"RAD.resource.ImgConfigList"
                        },
                        {
                            "caption":"管理权限",
                            "className":"RAD.project.PersonList",
                            "closeBtn":false,
                            "hidden":false,
                            "id":"personlist",
                            "imageClass":"fa fa-user-secret",
                            "popBtn":false,
                            "tag":"RAD.project.PersonList"
                        }
                    ])
                    .setLeft("0em")
                    .setTop("0em")
                    .setHeight("36em")
                    .setBarSize("2.3333333333333335em")
                    .setValue("versionlist")
                    .onItemSelected({
                        "actions":[
                            {
                                "args":[
                                    "{xui.showModule2()}",
                                    null,
                                    null,
                                    "{args[1].className}",
                                    "tab",
                                    "{args[1].id}",
                                    null,
                                    "{page.getData()}",
                                    null,
                                    "{page}"
                                ],
                                "conditions":[
                                    {
                                        "symbol":"defined",
                                        "right":"",
                                        "conditionId":"_defined_{args[1].className}",
                                        "left":"{args[1].className}"
                                    },
                                    {
                                        "symbol":"!=",
                                        "right":"{}",
                                        "conditionId":"{}_notequal_{args[1].className}",
                                        "left":"{args[1].className}"
                                    }
                                ],
                                "desc":"动作 1",
                                "method":"showModule2",
                                "redirection":"other:callback:call",
                                "target":"url",
                                "type":"other"
                            }
                        ]
                    })
            );

            host.tab.append(
                xui.create("xui.UI.Block")
                    .setHost(host,"xui_ui_block26")
                    .setName("content")
                    .setDock("fill")
                    .setLeft("0em")
                    .setTop("0em"),
                "versionlist"
            );

            host.xui_ui_block26.append(
                xui.create("xui.UI.TreeGrid")
                    .setHost(host,"xui_ui_treegrid30")
                    .setName("versionName")
                    .setLeft("0em")
                    .setTop("0em")
                    .setGridHandlerCaption("版本操作")
                    .setRowHandlerWidth("8em")
                    .setHeader([
                        {
                            "caption":"id",
                            "colResizer":true,
                            "editable":false,
                            "flexSize":false,
                            "hidden":true,
                            "id":"id",
                            "readonly":true,
                            "type":"label",
                            "width":"8.03030303030303em"
                        },
                        {
                            "caption":"工程名称",
                            "colResizer":true,
                            "editable":false,
                            "flexSize":false,
                            "hidden":false,
                            "id":"projectName",
                            "readonly":true,
                            "type":"label",
                            "width":"11.969696969696969em"
                        },
                        {
                            "caption":"版本号",
                            "colResizer":true,
                            "editable":false,
                            "flexSize":false,
                            "hidden":false,
                            "id":"version",
                            "readonly":true,
                            "type":"label",
                            "width":"4.015151515151515em"
                        },
                        {
                            "caption":"版本名称",
                            "colResizer":true,
                            "editable":false,
                            "flexSize":false,
                            "hidden":false,
                            "id":"versionName",
                            "readonly":true,
                            "type":"label",
                            "width":"8.03030303030303em"
                        },
                        {
                            "caption":"创建人",
                            "colResizer":true,
                            "editable":false,
                            "flexSize":false,
                            "hidden":false,
                            "id":"personname",
                            "readonly":true,
                            "type":"label",
                            "width":"8.03030303030303em"
                        },
                        {
                            "caption":"状态",
                            "colResizer":true,
                            "editable":false,
                            "editorListItems":[
                                {
                                    "caption":"冻结",
                                    "id":"UNDERREVISION"
                                },
                                {
                                    "caption":"激活",
                                    "id":"RELEASED"
                                },
                                {
                                    "caption":"测试中",
                                    "id":"UNDERTEST"
                                }
                            ],
                            "flexSize":false,
                            "hidden":false,
                            "id":"status",
                            "readonly":true,
                            "type":"listbox",
                            "width":"8.03030303030303em"
                        },
                        {
                            "caption":"创建时间",
                            "colResizer":true,
                            "editable":false,
                            "flexSize":false,
                            "hidden":false,
                            "id":"createTime",
                            "readonly":true,
                            "type":"datetime",
                            "width":"15.984848484848484em"
                        },
                        {
                            "caption":"所属空间",
                            "colResizer":true,
                            "editable":false,
                            "flexSize":false,
                            "hidden":false,
                            "id":"space",
                            "readonly":true,
                            "type":"label",
                            "width":"8.03030303030303em"
                        },
                        {
                            "caption":"最后一次更新时间",
                            "colResizer":true,
                            "editable":false,
                            "flexSize":true,
                            "hidden":false,
                            "id":"updateTime",
                            "readonly":true,
                            "type":"datetime",
                            "width":"8.03030303030303em"
                        }
                    ])
                    .setUidColumn("versionName")
                    .setTagCmds([
                        {
                            "caption":"",
                            "id":"UNDERREVISION",
                            "itemClass":"fa fa-connectdevelop",
                            "location":"left",
                            "tag":"row",
                            "tips":"冻结版本"
                        },
                        {
                            "id":"RELEASED",
                            "itemClass":"fa fa-crosshairs",
                            "location":"left",
                            "tag":"row",
                            "tips":"激活版本"
                        },
                        {
                            "id":"DELETEED",
                            "itemClass":"xuicon xui-uicmd-close",
                            "location":"left",
                            "tag":"row",
                            "tips":"删除版本"
                        }
                    ])
                    .setValue("")
                    .onCmd({
                        "actions":[
                            {
                                "args":[
                                    "{page.versionActionAjax.setQueryData()}",
                                    null,
                                    null,
                                    "{args[1].versionName}",
                                    "versionName"
                                ],
                                "desc":"动作 4",
                                "method":"setQueryData",
                                "redirection":"other:callback:call",
                                "target":"versionActionAjax",
                                "type":"control"
                            },
                            {
                                "args":[
                                    "{page.versionActionAjax.setQueryData()}",
                                    null,
                                    null,
                                    "{args[2]}",
                                    "status"
                                ],
                                "desc":"动作 3",
                                "method":"setQueryData",
                                "redirection":"other:callback:call",
                                "target":"versionActionAjax",
                                "type":"control"
                            },
                            {
                                "args":[
                                    "{page.versionActionAjax.invoke()}"
                                ],
                                "desc":"动作 2",
                                "koFlag":"_DI_fail",
                                "method":"invoke",
                                "okFlag":"_DI_succeed",
                                "redirection":"other:callback:call",
                                "target":"versionActionAjax",
                                "type":"control"
                            }
                        ]
                    })
                    .onDblclickRow({
                        "actions":[
                            {
                                "args":[
                                    "{xui.openDebugWin()}",
                                    null,
                                    null,
                                    "{args[1].url}/RAD/{args[1].versionName}/projectManager",
                                    "{args[1].projectName}"
                                ],
                                "desc":"动作 1",
                                "method":"call",
                                "target":"callback",
                                "type":"other"
                            }
                        ]
                    })
                    .onClickCell({
                        "actions":[
                            {
                                "args":[
                                    "{args[1]}"
                                ],
                                "desc":"动作 1",
                                "method":"log",
                                "target":"msg",
                                "type":"other"
                            }
                        ]
                    })
            );

            host.xui_ui_block26.append(
                xui.create("xui.UI.ToolBar")
                    .setHost(host,"xui_ui_toolbar51")
                    .setItems([
                        {
                            "caption":"common",
                            "dynDestory":false,
                            "hidden":false,
                            "id":"common",
                            "sub":[
                                {
                                    "caption":"新增",
                                    "dynDestory":false,
                                    "hidden":false,
                                    "id":"add",
                                    "imageClass":"fa fa-lg fa-calendar-plus-o",
                                    "position":"absolute",
                                    "iconFontSize":""
                                },
                                {
                                    "caption":"删除",
                                    "dynDestory":false,
                                    "hidden":true,
                                    "id":"delete",
                                    "imageClass":"fa fa-lg fa-close",
                                    "position":"absolute",
                                    "iconFontSize":""
                                },
                                {
                                    "caption":"刷新",
                                    "dynDestory":false,
                                    "hidden":false,
                                    "id":"reload",
                                    "imageClass":"fa fa-lg fa-circle-o-notch",
                                    "position":"absolute",
                                    "iconFontSize":""
                                }
                            ]
                        }
                    ])
                    .setTop("5em")
                    .onClick({
                        "actions":[
                            {
                                "args":[ ],
                                "conditions":[
                                    {
                                        "symbol":"=",
                                        "right":"add",
                                        "conditionId":"add_equal_{args[5]}",
                                        "left":"{args[5]}"
                                    }
                                ],
                                "desc":"删除工程",
                                "koFlag":"_DI_fail",
                                "method":"invoke",
                                "okFlag":"_DI_succeed",
                                "return":false,
                                "target":"createVersionAjax",
                                "type":"control"
                            },
                            {
                                "args":[ ],
                                "conditions":[
                                    {
                                        "symbol":"=",
                                        "right":"reload",
                                        "conditionId":"reload_equal_{args[1.id}",
                                        "left":"{args[1.id}"
                                    }
                                ],
                                "desc":"重新装载",
                                "koFlag":"_DI_fail",
                                "method":"invoke",
                                "okFlag":"_DI_succeed",
                                "target":"loadproject",
                                "type":"control"
                            }
                        ]
                    })
            );

            host.xui_ui_block26.append(
                xui.create("xui.UI.Block")
                    .setHost(host,"xui_ui_block61")
                    .setDock("bottom")
                    .setLeft("5.833333333333333em")
                    .setTop("78.33333333333333em")
                    .setHeight("3.5em")
            );

            host.xui_ui_block61.append(
                xui.create("xui.UI.PageBar")
                    .setHost(host,"xui_ui_pagebar3")
                    .setLeft("4.75em")
                    .setTop("0.75em")
                    .setCaption("翻页")
            );

            host.xui_ui_dialog4.append(
                xui.create("xui.UI.Block")
                    .setHost(host,"xui_ui_block75")
                    .setDock("bottom")
                    .setLeft("0em")
                    .setTop("10em")
                    .setHeight("3.5833333333333335em")
            );

            host.xui_ui_block75.append(
                xui.create("xui.UI.Button")
                    .setHost(host,"xui_ui_button21")
                    .setLeft("22.833333333333332em")
                    .setTop("0.75em")
                    .setCaption("保存")
                    .setImageClass("xui-icon-right")
                    .onClick([
                        {
                            "desc":"动作 2",
                            "type":"page",
                            "target":"RAD.project.ProjectSetting",
                            "args":[
                                "{page.postMessage()}",
                                undefined,
                                undefined,
                                "saveSetting"
                            ],
                            "method":"postMessage",
                            "redirection":"page::",
                            "className":"RAD.project.ProjectSetting"
                        },
                        {
                            "args":[
                                "{page.saveApi.invoke()}"
                            ],
                            "desc":"动作 1",
                            "method":"invoke",
                            "redirection":"other:callback:call",
                            "target":"saveApi",
                            "type":"control"
                        }
                    ])
            );

            host.xui_ui_block75.append(
                xui.create("xui.UI.Button")
                    .setHost(host,"xui_ui_button22")
                    .setLeft("34.5em")
                    .setTop("0.75em")
                    .setCaption("关闭")
                    .setImageClass("xui-uicmd-close")
                    .onClick({
                        "actions":[
                            {
                                "args":[ ],
                                "desc":"动作 1",
                                "method":"destroy",
                                "target":"xui_ui_dialog4",
                                "type":"control"
                            }
                        ]
                    })
            );

            return children;
            // ]]Code created by JDSEasy RAD Studio
        },

        customAppend :  function(parent, subId, left, top){
            return false;
        } ,
        ViewMenuBar:{},

    } ,
    Static:{
        "designViewConf":{
            "height":1024,
            "mobileFrame":false,
            "width":1280
        }
    }

});